package com.lwb.educms.controller;


import com.lwb.commonutils.Row;
import com.lwb.educms.entity.CrmBanner;
import com.lwb.educms.service.CrmBannerService;
import jdk.nashorn.internal.runtime.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-12-01
 */
@RestController
@RequestMapping("/educms/bannerFront")
@CrossOrigin
public class CrmBannerFrontController {

    @Autowired
    private CrmBannerService crmBannerService;

    @GetMapping("findAllBanner")
    public Row findAllBanner(){
        List<CrmBanner> list = crmBannerService.findAllBanner();
        return Row.SUCCESS().data("list",list);
    }
}

